import 'package:xvideos/hj_utils/api_service/vid_service.dart';
import 'package:xvideos/hj_utils/light_model.dart';

class WatchCount {
  int? watchCount; // 观看次数
  bool? isCan; // 金币视频不再免费次数内

  //⚠️注意: coinWatchCount: 活动权益金币视频免费观看次数, 需要手动赋值,
  int coinWatchCount = -1; //短视频业务专用, 因为短视频业务提前预加载数据,需要copy对象,保存当前对应的count值

  static WatchCount fromJson(Map<String, dynamic>? map) {
    map ??= {};

    WatchCount watchCountobj = WatchCount();
    watchCountobj.watchCount = map['watchCount'];
    watchCountobj.isCan = map['isCan'];
    return watchCountobj;
  }

  WatchCount copy() {
    WatchCount model = WatchCount();
    model.watchCount = watchCount;
    return model;
  }
}
